package love.yuanmengrobot.qdkaoqin.business;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import love.yuanmengrobot.qdkaoqin.R;

public class MainActivity extends AppCompatActivity {
    public static final String MESSAGE_STRING="love.yuanmengrobot.chjy.MESSAGE";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_begin);

        Button studentLoginB = findViewById(R.id.studentLogin);
        studentLoginB.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //活动跳转
                {
                    Intent intent = new Intent(MainActivity.this,
                            ToLoginActivity.class);
                    intent.putExtra(MESSAGE_STRING,
                            "学生登录");
                    startActivity(intent);
                }
            }
        });
        Button teacherLoginB=findViewById(R.id.teacherLogin);
        teacherLoginB.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //活动跳转
                {
                    Intent intent = new Intent(MainActivity.this,
                            ToLoginActivity.class);
                    intent.putExtra(MESSAGE_STRING,
                            "教师登录");
                    startActivity(intent);
                }
            }
        });
        Button stuRegister=findViewById(R.id.studentRegister);
        stuRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //活动跳转
                Intent intent=new Intent(MainActivity.this, RegisterActivity.class);
                intent.putExtra(MESSAGE_STRING,"学生注册");
                startActivity(intent);
            }
        });
        Button teaRegister=findViewById(R.id.teacherRegister);
        teaRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //活动跳转
                Intent intent=new Intent(MainActivity.this, RegisterActivity.class);
                intent.putExtra(MESSAGE_STRING,"教师注册");
                startActivity(intent);
            }
        });

    }

}